package images;

import java.util.HashMap;
import java.util.Map;

import com.uqbar.vainilla.appearances.Sprite;
import components.blocks.Block;

public class GameImagesMap {

	private static Map<String, Sprite> dic = new HashMap<String, Sprite>();

	public void initializeResources(){
		Sprite sp, sp2, sp3, sp4, sp5, sp6, sp7, sp8, sp9, sp10, sp11, sp12;
		sp = Sprite.fromImage("/images/normalball.png");
		sp = sp.scale(0.8, 0.8);
		dic.put("normalball", sp);
		
		sp2 = Sprite.fromImage("/images/verticalborder.png");
		sp2 = sp2.scaleTo(30, 600);
		dic.put("verticalborder", sp2);
		
		sp3 = Sprite.fromImage("/images/horizontalborder.png");
		sp3 = sp3.scaleTo(800, 30);
		dic.put("horizontalborder", sp3);
		
		sp4 = Sprite.fromImage("/images/horizontalborder.png");
		sp4 = sp4.scaleTo(100, 20);
		dic.put("normalpaddle", sp4);
		
		sp5 = Sprite.fromImage("/images/horizontalborder.png");
		sp5 = sp5.scaleTo(170, 20);
		dic.put("largepaddle", sp5);
		
		sp6 = Sprite.fromImage("/images/fondo.PNG");
		sp6 = sp6.scaleTo(800, 600);
		dic.put("bglevel1", sp6);
		
		sp7 = Sprite.fromImage("/images/bglevel2.png");
		sp7 = sp7.scaleTo(800, 600);
		dic.put("bglevel2", sp7);
		
		sp8 = Sprite.fromImage("/images/block1.png");
		sp8 = sp8.scaleTo(Block.WIDTH, Block.HEIGHT);
		dic.put("block1", sp8);
		
		sp9 = Sprite.fromImage("/images/goldblock.png");
		sp9 = sp9.scaleTo(Block.WIDTH, Block.HEIGHT);
		dic.put("goldblock", sp9);
		
		sp10 = Sprite.fromImage("/images/greensun.png");
		sp10 = sp10.scaleTo(20, 20);
		dic.put("greensun", sp10);
		
		sp11 = Sprite.fromImage("/images/bluesun1.png");
		sp11 = sp11.scaleTo(20, 20);
		dic.put("bluesun", sp11);
		
		sp12 = Sprite.fromImage("/images/firewall.png");
		sp12 = sp12.scaleTo(800, 19);
		dic.put("firewall", sp12);
		
	}
	
	public static Sprite getImage(String name){
		return dic.get(name);
	}
	public Map<String, Sprite> getDic() {
		return dic;
	}

	public void setDic(Map<String, Sprite> dic) {
		this.dic = dic;
	}
}
